const getters = {
    sidebar: state => state.app.sidebar,
    device: state => state.app.device,
    token: state => state.user.token,
    avatar: state => state.user.userInfo && state.user.userInfo.staffPhoto, // 建立用户头像的映射
    uname: state => state.user.userInfo && state.user.userInfo.username, //获取用户信息 短路运算
    userId: state => state.user.userInfo && state.user.userInfo.userId
}
export default getters
//全局getters 访问局部

//简化数据操作 魔板简化